package com.rx.action.admin;

import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.Results;

import com.rx.action.BaseAction;
import com.rx.biz.BaseBiz;
import com.rx.entity.sys.User;

@Namespace("/admin")
@Results( { @Result(name = "login", location = "login.html") })
public class LogoutAction extends BaseAction<User, Long> {

	@Override
	public String list() throws Exception {
		// 从session中移除用户
		getSession().removeAttribute("user");
		getSession().removeAttribute("currentUserName");
		// 从session中移除权限编号
		getSession().removeAttribute("privilege_code");
		// 从session中移除权限地址
		getSession().removeAttribute("privilege_url");
		getSession().invalidate();
		return "login";
	}

	@Override
	public String delete() throws Exception {
		return null;
	}

	@Override
	public String input() throws Exception {
		return null;
	}

	@Override
	public String save() throws Exception {
		return null;
	}

	@Override
	public void setBiz(BaseBiz<User, Long> biz) {

	}

}
